<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: src/core/CL/cl_kernels/magnitude_phase.cl File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">17.10</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
      <li><a href="globals.xhtml"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('magnitude__phase_8cl.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">magnitude_phase.cl File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
</div>
<p><a href="magnitude__phase_8cl_source.xhtml">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a259a59d7a4f247119c457af235827a29"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(x, y)&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td></tr>
<tr class="separator:a259a59d7a4f247119c457af235827a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4434551334149479f843f87424bbb8c8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a>(x, y)&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td></tr>
<tr class="separator:a4434551334149479f843f87424bbb8c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
<tr class="memdesc:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates L1 normalization between two inputs.  <a href="#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">More...</a><br/></td></tr>
<tr class="separator:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec9387519a61474acb0b2bf90ef6d94d"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#aec9387519a61474acb0b2bf90ef6d94d">magnitude_l2</a> (int16 a, int16 b)</td></tr>
<tr class="memdesc:aec9387519a61474acb0b2bf90ef6d94d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates L2 normalization between two inputs.  <a href="#aec9387519a61474acb0b2bf90ef6d94d">More...</a><br/></td></tr>
<tr class="separator:aec9387519a61474acb0b2bf90ef6d94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0d7e891c8a09824c46baa2393d6961f"><td class="memItemLeft" align="right" valign="top">uchar16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
<tr class="memdesc:ab0d7e891c8a09824c46baa2393d6961f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates unsigned phase between two inputs.  <a href="#ab0d7e891c8a09824c46baa2393d6961f">More...</a><br/></td></tr>
<tr class="separator:ab0d7e891c8a09824c46baa2393d6961f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02ff978b574e44604d625dbd470ab870"><td class="memItemLeft" align="right" valign="top">uchar16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a02ff978b574e44604d625dbd470ab870">phase_signed</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
<tr class="memdesc:a02ff978b574e44604d625dbd470ab870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates signed phase between two inputs.  <a href="#a02ff978b574e44604d625dbd470ab870">More...</a><br/></td></tr>
<tr class="separator:a02ff978b574e44604d625dbd470ab870"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76ac02e1f05a26f67090c9464434e04a"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a76ac02e1f05a26f67090c9464434e04a">magnitude_phase</a> (__global uchar *gx_ptr, uint gx_stride_x, uint gx_step_x, uint gx_stride_y, uint gx_step_y, uint gx_offset_first_element_in_bytes, __global uchar *gy_ptr, uint gy_stride_x, uint gy_step_x, uint gy_stride_y, uint gy_step_y, uint gy_offset_first_element_in_bytes, __global uchar *magnitude_ptr, uint magnitude_stride_x, uint magnitude_step_x, uint magnitude_stride_y, uint magnitude_step_y, uint magnitude_offset_first_element_in_bytes, __global uchar *phase_ptr, uint phase_stride_x, uint phase_step_x, uint phase_stride_y, uint phase_step_y, uint phase_offset_first_element_in_bytes)</td></tr>
<tr class="memdesc:a76ac02e1f05a26f67090c9464434e04a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the magnitude and phase of given the gradients of an image.  <a href="#a76ac02e1f05a26f67090c9464434e04a">More...</a><br/></td></tr>
<tr class="separator:a76ac02e1f05a26f67090c9464434e04a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a259a59d7a4f247119c457af235827a29"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAGNITUDE_OP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">y&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00081">81</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>

<p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>

</div>
</div>
<a class="anchor" id="a4434551334149479f843f87424bbb8c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PHASE_OP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">x, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">y&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00089">89</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>

<p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aedc7e5ee4cb8f5a0240e422f9a9e7ce9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DATA_TYPE16 magnitude_l1 </td>
          <td>(</td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates L1 normalization between two inputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>L1 normalization magnitude result. Supported data types: S16, S32 </dd></dl>

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00033">33</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>

<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">arm_compute::test::fixed_point_arithmetic::detail::abs()</a>, <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
<div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(add_sat(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(a), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(b)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16));</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div>
<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00040">direct_convolution1x1.cl:40</a></div></div>
<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ae115fc750a92fb6a5e094998b56fcc56"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">arm_compute::test::fixed_point_arithmetic::detail::abs</a></div><div class="ttdeci">fixed_point&lt; T &gt; abs(fixed_point&lt; T &gt; x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">FixedPoint.h:914</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aec9387519a61474acb0b2bf90ef6d94d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">DATA_TYPE16 magnitude_l2 </td>
          <td>(</td>
          <td class="paramtype">int16&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates L2 normalization between two inputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>L2 normalization magnitude result. Supported data types: S16, S32 </dd></dl>

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00045">45</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>

<p>References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
<div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>((sqrt(convert_float16((convert_uint16(a * a) + convert_uint16(b * b)))) + 0.5f),</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                       <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16));</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;}</div>
<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00040">direct_convolution1x1.cl:40</a></div></div>
<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a76ac02e1f05a26f67090c9464434e04a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__kernel void magnitude_phase </td>
          <td>(</td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>gx_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gx_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gx_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gx_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gx_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gx_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>gy_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gy_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gy_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gy_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gy_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>gy_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>magnitude_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>magnitude_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>magnitude_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>magnitude_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>magnitude_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>magnitude_offset_first_element_in_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">__global uchar *&#160;</td>
          <td class="paramname"><em>phase_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>phase_stride_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>phase_step_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>phase_stride_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>phase_step_y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>phase_offset_first_element_in_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the magnitude and phase of given the gradients of an image. </p>
<dl class="section note"><dt>Note</dt><dd>Magnitude calculation supported: L1 normalization(type = 1) and L2 normalization(type = 2). </dd>
<dd>
Phase calculation supported: Unsigned(type = 1) [0,128] and Signed(type = 2) [0,256).</dd></dl>
<dl class="section attention"><dt>Attention</dt><dd>To enable phase calculation -DPHASE="phase_calculation_type_id" must be provided at compile time. eg -DPHASE=1 </dd>
<dd>
To enable magnitude calculation -DMAGNITUDE="magnitude_calculation_type_id" must be provided at compile time. eg -DMAGNITUDE=1 </dd>
<dd>
Datatype of the two inputs is passed at compile time using -DDATA_TYPE. e.g -DDATA_TYPE=short. Supported data_types are: short and int</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_ptr</td><td>Pointer to the first source image (gradient X). Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_step_x</td><td>gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_step_y</td><td>gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gx_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_ptr</td><td>Pointer to the second source image (gradient Y) . Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_step_x</td><td>gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_step_y</td><td>gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">magnitude_ptr</td><td>Pointer to the magnitude destination image. Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_step_x</td><td>magnitude_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_step_y</td><td>magnitude_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">phase_ptr</td><td>Pointer to the phase destination image. Supported data types: U8 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">phase_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">phase_step_x</td><td>phase_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">phase_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">phase_step_y</td><td>phase_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">phase_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">130</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00081">MAGNITUDE_OP</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00089">PHASE_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;{</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="comment">// Get pixels pointer</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(gx);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(gy);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="comment">// Load values</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    in_a = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)gx.ptr);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    in_b = vload16(0, (__global DATA_TYPE *)gy.ptr);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="comment">// Calculate and store the results</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="preprocessor">#ifdef MAGNITUDE</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="preprocessor"></span>    <a class="code" href="struct_image.xhtml">Image</a> magnitude = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(magnitude);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    vstore16(<a class="code" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(in_a, in_b), 0, (__global DATA_TYPE *)magnitude.ptr);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MAGNITUDE */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#ifdef PHASE</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="preprocessor"></span>    <a class="code" href="struct_image.xhtml">Image</a> phase = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(phase);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    vstore16(<a class="code" href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a>(in_a, in_b), 0, phase.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PHASE */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="preprocessor"></span>}</div>
<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00096">helpers.h:96</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00134">helpers.h:134</a></div></div>
<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00136">helpers.h:136</a></div></div>
<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
<div class="ttc" id="magnitude__phase_8cl_xhtml_a4434551334149479f843f87424bbb8c8"><div class="ttname"><a href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a></div><div class="ttdeci">#define PHASE_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="magnitude__phase_8cl_source.xhtml#l00089">magnitude_phase.cl:89</a></div></div>
<div class="ttc" id="magnitude__phase_8cl_xhtml_a259a59d7a4f247119c457af235827a29"><div class="ttname"><a href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a></div><div class="ttdeci">#define MAGNITUDE_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="magnitude__phase_8cl_source.xhtml#l00081">magnitude_phase.cl:81</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a02ff978b574e44604d625dbd470ab870"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uchar16 phase_signed </td>
          <td>(</td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates signed phase between two inputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Signed phase mapped in the interval [0, 256). Supported data types: U8 </dd></dl>

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00072">72</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    float16 arct = atan2pi(convert_float16(b), convert_float16(a));</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    arct         = select(arct, arct + 2, arct &lt; 0.0f);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordflow">return</span> convert_uchar16(convert_int16(mad(arct, 128, 0.5f)) &amp; 0xFFu);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab0d7e891c8a09824c46baa2393d6961f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uchar16 phase_unsigned </td>
          <td>(</td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DATA_TYPE16&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculates unsigned phase between two inputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Unsigned phase mapped in the interval [0, 180]. Supported data types: U8 </dd></dl>

<p>Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00058">58</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
<div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    float16 angle_deg_f32 = atan2pi(convert_float16(b), convert_float16(a)) * (float16)180.0f;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    angle_deg_f32         = select(angle_deg_f32, (float16)180.0f + angle_deg_f32, angle_deg_f32 &lt; (float16)0.0f);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">return</span> convert_uchar16(angle_deg_f32);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="magnitude__phase_8cl.xhtml">magnitude_phase.cl</a></li>
    <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
